<template>
  <div>
    <RadioGroup v-model="rightAnswer">
      <Radio label="A">
      </Radio>
      <Input v-model="answer.A" placeholder="请输入选项"/>
      <Radio label="B">
      </Radio>
      <Input v-model="answer.B" placeholder="请输入选项"/>
      <Radio label="C">
      </Radio>
      <Input v-model="answer.C" placeholder="请输入选项"/>
      <Radio label="D">
      </Radio>
      <Input v-model="answer.D" placeholder="请输入选项"/>
    </RadioGroup>
  </div>

</template>
<script>
  export default {
    name: 'AnswerRadio',
    props: ['answers', 'rightAnswer'],
    data() {
      return {
        answer:{}
      }
    },
    mounted() {
      this.answer = this.answers;
    },
    methods: {},
    watch: {
      answer: {
        handler(val) {
          this.$emit('update:answers', val);
        },
        deep: true
      },
      rightAnswer(val) {
        this.$emit('update:rightAnswer', val);
      },
    },
  }
</script>
<style lang="less">

</style>
